Invoke-GSUserOffboarding

SYNOPSIS

Wraps some common offboarding tasks such as random password setting, OAuth token revocation, mobile device removal, and more.

SYNTAX

Invoke-GSUserOffboarding [-User] <String[]> [-Options <String[]>] [-DestinationOrgUnit <String>]
 [-License <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Wraps some common offboarding tasks such as random password setting, OAuth token revocation, mobile device removal, and more.

This function outputs in a log-style, timestamped format that is intended for auditability.

EXAMPLES

EXAMPLE 1

Invoke-GSUserOffboarding -User [email protected] -Options Full -DestinationOrgUnit '/Former Employees'

Performs all of the listed tasks against user Tom Fields, including moving them to the '/Former Employees' OrgUnit and setting them to a VFE license.

PARAMETERS

-DestinationOrgUnit

If Options include Full or MoveToOrgUnit, this is the OrgUnit that the user will be moved to.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-License

The License to set the user to.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: Google-Vault-Former-Employee
Accept pipeline input: False
Accept wildcard characters: False

-Options

The tasks you would like to perform on the User. Defaults to the following: 'ClearASPs','ClearOAuthTokens','RemoveMobileDevices','Suspend','SetRandomPassword'

Available options: * 'Full' - Performs all of the below tasks * 'ClearASPs' - Clears Application Specific Passwords * 'ClearOAuthTokens' - Clears OAuth tokens * 'RemoveMobileDevices' - Removes Mobile Devices * 'Suspend' - Suspends the user account * 'SetRandomPassword' - Sets the user's account to a random password * 'MoveToOrgUnit' - Moves the user to the DestinationOrgUnit specified * 'SetLicense' - Sets the user to a different license

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: @('ClearASPs','ClearOAuthTokens','RemoveMobileDevices','Suspend','SetRandomPassword')
Accept pipeline input: False
Accept wildcard characters: False

-User

The User to offboard

Type: String[]
Parameter Sets: (All)
Aliases: PrimaryEmail, Mail

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.String

NOTES

Pull requests welcome for functionality enhancements!

Comments